package com.ruoyi.exam.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.exam.domain.ExamUserBankProgress;
import com.ruoyi.exam.vo.ExamUserBankProgressVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 用户题库进度Mapper接口
 *
 * @author Tellsea
 * @date 2025-06-23
 */
public interface ExamUserBankProgressMapper extends BaseMapper<ExamUserBankProgress> {

    Page<ExamUserBankProgressVo> queryList(Page<?> page, @Param("entity") ExamUserBankProgressVo entity);

    List<ExamUserBankProgressVo> queryList(@Param("entity") ExamUserBankProgressVo entity);

    ExamUserBankProgressVo queryById(@Param("id") Long progressId);

    /**
     * 根据用户ID和题库ID查询进度
     *
     * @param userId 用户ID
     * @param bankId 题库ID
     * @return
     */
    ExamUserBankProgressVo getByUserIdAndBankId(@Param("userId") Long userId, @Param("bankId") Long bankId);

}
